#include "common.h"

double pow(double x, long long n)
{
	if (n == 0) return 1;
	double half = myPow(x, n / 2);
	if ((n % 2) != 0) return x * half * half;
	else return half * half;
}
double myPow(double x, int n)
{
	return n > 0 ? pow(x, n) : 1.0 / pow(x, -(long long)n);
}
